package com.example.fw;

import org.openqa.selenium.By;

public class ActionWorker extends BaseWorker {

	public ActionWorker(ApplicationManager manager) {
		super(manager);
	}

	public void submitCreation() {
		click(By.name("submit"));
	}
	
	public void initCreation() {
		click(By.name("new"));
	}
	
	public void delete() {
		click(By.name("delete"));
	}
	
	public void initEdit() {
		click(By.name("edit"));
	}
	
	public void update() {
		click(By.name("update"));
	}
	
	public void flag(int index) {
		click(By.xpath("(//input[@name='selected[]'])[" + index + "]"));
	}
	
	public void iconEdit(int index) {
		click(By.xpath("(//img[@alt='Edit'])[" + index + "]"));
	}
	
	public void deleteContact() {
		click(By.xpath("(//input[@name='update'])[2]"));
	}
}
